<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>中国梦想游-会员登录页</title>
<script type="text/javascript">
/***********验证用户名*************/
function checkLoginName(){
	var strName=document.getElementById("LoginName").value;
	var divName=document.getElementById("z1");
	divName.style.display="inline";
	if(strName==""){
		divName.innerHTML="<font color='red'>请填写用户名</font>";
		return false;
	}
	var reg=/^[\u4E00-\u9FA5]{2,6}$/;
	if(!reg.test(strName)){
		divName.innerHTML="<font color='red'>名字中只能用4-6个汉字组成！</font>";
		return false;
	}else{
		divName.innerHTML="<font color='green'></font>";	
	}
	return true;
}
/***********验证密码*************/
function checkLoginPass(){
	var strPass=document.getElementById("LoginPass").value;
	var divName=document.getElementById("z2");
	divName.style.display="inline";
	if(strPass==""){
		divName.innerHTML="<font color='red'>请填写密码</font>";
		return false;
	}
	var reg=/^\w{6,16}$/;
	if(!reg.test(strPass)){
		divName.innerHTML="<font color='red'>密码中只能用6-16个字符（数字、字母、下划线和汉字）组成！</font>";
		return false;
	}else{
		divName.innerHTML="<font color='green'></font>";	
	}
	return true;
}
function checkAlll(){
	var LoginName = document.getElementById("LoginName");
	var LoginPass = document.getElementById("LoginPass");
	if(checkLoginName(LoginName) && checkLoginPass(LoginPass)){
		return true;
	}else{
		alert("验证不通过，请返回重新验证！！");
		return false;
	}
}
</script>
<style type="text/css">
#LoginPass{
	height: 30px;
	width: 178px;
}
</style>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="top_hw clearfix">
    <div class="top_h clearfix">
        <div class="top_hl"><span>欢迎来到中国梦想游，让你的梦想全程免费自由行！</span> 预定热线：<b>0571-63322269</b></div>
        <div class="top_hr"><a href="reg.jsp">会员注册</a>  |  <a href="login.jsp">登录</a>  </div>
    </div>
</div>
<div class="head_w">
    <div class="head_t clearfix">
        <div class="logo"><img src="images/logo.jpg"></div>
        <div class="rx_line"><img src="images/rx.jpg"></div>
    </div>
</div>
<!-- <div class="mainNav clearfix"> -->
<!--     <ul class="Nav_ul"> -->
<!--         <li><a href="中国梦想游首页.html">首页</a><img src="images/nav_line.jpg"></li> -->
<!--         <li ><a  href="旅游路线.html">旅游路线</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="旅游景点.html">旅游景点</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="餐饮住宿.html">餐饮住宿</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="交通路线-详情1.html">交通线路</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="旅游团购.html">旅游团购</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="地方特产.html">地方特产</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="自动生成简介.html">自动生成简介</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="团队简介-关于中国梦想游.html">团队简介</a><img src="images/nav_line.jpg"></li> -->
<!--         <li><a href="行程导航-详情.html">行程导航</a></li> -->
<!--     </ul> -->
<!-- </div> -->
<div class="b_wrap">
    <div class="current"><span>当前所在地：</span><a href="login.jsp">首页</a>  >> <a href="login.jsp">会员登录</a></div>
    <div class="login_w clearfix">
        <div class="login">
            <div class="login_t">会员登录</div>
            <div class="login_con">
            <form action="${pageContext.request.contextPath}/UserLoginServlet" name="" onsubmit="return checkAlll()" method="post">
                <table class="login_tab" width="270" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td>登录名：</td>
                    <td><input type="text" name="username" id="LoginName" value="" placeholder=""><br>
                     <div id="z1" style=" display:none;background-color:#FFF"></div>
                    </td>
                  </tr>
                  <tr>
                    <td>密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
                    <td><input type="password" name="password" id="LoginPass" value="" placeholder=""><br>
                     <div id="z2" style=" display:none;background-color:#FFF"></div>
                    </td>
                  </tr>
                  <tr>
                    <td></td>
                    <td><input  type="checkbox" name="" value=""> 30天内自动登录</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>
                        <input type="submit" class="log_b" value="登录" />
                        <a class="back_m" href="FindPass.jsp">找回密码</a>
                    </td>
<!--                     <td><a class="log_b" href="会员中心.html" >登 录</a> <a class="back_m" href="#">找回密码</a></td> -->
                  </tr>
                </table>
                </form>
            </div>
            <div class="login_b">
                <p>还不是梦想游会员？  <a class="free_zc" href="reg.jsp">免费注册</a> </p>
                <p>使用合作网站帐号登录 </p>
                <p><a class="log_a01" href="#">新浪微博</a> <a class="log_a02" href="#">支付宝</a> <a class="log_a03" href="#">QQ帐号</a></p>
            </div>
        </div>
    </div>
</div>

<div class="footer_w">
    <div class="footer clearfix">
        <div class="footer_c">
            <p>地址：中国浙江省杭州市西湖区教工路316号 &nbsp;| &nbsp;服务热线：0571-62332269 &nbsp; | &nbsp;传真：0571-62337233  备案号：0453-2xxxxxx</p>
            <p>Copyright © 2013 中国梦想旅游发展有限公司 All Rights Reserved. 技术支持：<a href="#">杭州风靡网络</a></p>
        </div>
        <div class="f_logo"><img src="images/b_logo.jpg"></div>
    </div>
</div>
</body>
</html>
    